import pandas as pd
import matplotlib.pyplot as plt

price_table = pd.read_excel('price.xlsx')

plt.rcParams['font.sans-serif'] = 'SimHei'  # 设置字体为SimHei
plt.rcParams['axes.unicode_minus'] = False  # 解决负号“-”显示异常
plt.xlabel('日期')
plt.ylabel('价格')
plt.title("猪肉牛肉价格")

date = price_table.loc[:, "日期"]
price_pig = price_table.loc[:, "猪肉价格"]
price_cow = price_table.loc[:, "牛肉价格"]

plt.scatter(date.values, price_pig.values, c='#FF0000', marker='*', s=50)
plt.scatter(date.values, price_cow.values)
plt.xticks(rotation=45)